Skip to content

Avoid sending VLA in every packet#866

Merged
algesten merged 2 commits intoalgesten:mainfrom
Ramil980:fix/vla
Feb 15, 2026
Merged

Avoid sending VLA in every packet#866
algesten merged 2 commits intoalgesten:mainfrom
Ramil980:fix/vla

Conversation

@Ramil980
Copy link
Contributor

Hi @algesten,

At the moment, VLA is added to every packet in a frame. However, based on the libwebrtc implementation, it should only be included in the first packet of the frame. This PR fixes that behavior

Copy link
Owner

@algesten algesten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use VLA yet, but this seems reasonable. @xnorpx do you agree?

@xnorpx
Copy link
Collaborator

xnorpx commented Feb 15, 2026

@algesten I think it looks resonable. But this would not work if we had if a user brought their own RTP header extension?

@algesten
Copy link
Owner

@algesten I think it looks resonable. But this would not work if we had if a user brought their own RTP header extension?

What do you mean?

@xnorpx
Copy link
Collaborator

xnorpx commented Feb 15, 2026

@algesten I think it looks resonable. But this would not work if we had if a user brought their own RTP header extension?

What do you mean?

  let mut pkt_ext_vals = ext_vals.clone();
            if !first {
                pkt_ext_vals.user_values.remove::<VideoLayersAllocation>();
            }

I read it as it will remove VideoLayesAllocation if it's not the first package.

If I create my own say DD header extension which should also only be on the first packet (similar to VLA)

I do not contribute this back to str0m, how can I avoid to get it attached to all packets in the frame?

@algesten
Copy link
Owner

@xnorpx the change only affected the Media level API, where it attaches the VLA while packetizing. With RTP-mode you can send anything you want on any packet.

@xnorpx
Copy link
Collaborator

xnorpx commented Feb 15, 2026

@algesten yes, but I am talking about other header extensions on Media level API.

But we can just contribute those back and add in similar way to VLA (this is not a big blocker just pointing it out)

@algesten algesten merged commit 4b33b71 into algesten:main Feb 15, 2026
55 checks passed
@Ramil980
Copy link
Contributor Author

Thanks for merging!

@algesten @xnorpx, I can pull the list of extensions from libwebrtc that are not send in all packets and fix the behaviour here. For example, from a quick check, Absolute Capture Time is only sent on the first packet, Video Orientation is only sent on the last packet, and so on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants